<script setup lang="ts">
  import { taskStore } from '@/store/modules/task';
  import { computed } from 'vue';

  const todosStore = taskStore();

  const props = defineProps<{
    label: string;
    name: 'days' | 'priority' | 'isFinished';
    options: Array<any>;
  }>();
  const realOptions = computed(() => [{ label: '所有', value: 'all' }, ...props.options]);
</script>
<template>
  <div>
    <label for="">{{ label }}</label>
    <NSelect
      v-model:value="todosStore.conditions[name]"
      :options="realOptions"
      style="width: 8rem"
    />
  </div>
</template>
